package org.example.design.Factory;

import org.example.design.Factory.abstractfactory.IFactory;
import org.example.design.Factory.dailyfactory.PhoneFactory;
import org.example.design.Factory.factorymethod.IPhonFactory;

/**
 * @Auther:Liu
 * @Testname:App
 * @Date:2025/8/15 10:43
 */
public class App {

    public static void a() {
        Phone phone = PhoneFactory.makePhone("小米");
        phone.showPhone();
    }


    public static void b() {
        IPhonFactory iPhonFactory = new IPhonFactory();
        Phone phone = iPhonFactory.makePhone();
        phone.showPhone();
    }

    public static void c() {
        IFactory iFactory = new IFactory();
        Pc pc = iFactory.createPc();
        pc.showPc();
        Phone phone = iFactory.createPhone();
        phone.showPhone();
    }

    public static void main(String[] args) {
       c();
    }
}
